package org.goodprinciples.oracolo.model;

import java.util.Objects;
import java.util.Set;

/**
 *
 * @author Francesco Conte
 */
public class Element extends OracoloBean<Element> {
    
    private Long id = null;
    private Long code = null;
    private Domain domain = null;
    private Set<ElementDescription> descriptions = null;
    
    public Element() {}

    public Long getCode() {
        return code;
    }

    public void setCode(Long code) {
        this.code = code;
    }

    public Set<ElementDescription> getDescriptions() {
        return descriptions;
    }

    public void setDescriptions(Set<ElementDescription> descriptions) {
        this.descriptions = descriptions;
    }

    public Domain getDomain() {
        return domain;
    }

    public void setDomain(Domain domain) {
        this.domain = domain;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public boolean equals(java.lang.Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Element other = (Element) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        int hash = 3;
        hash = 83 * hash + Objects.hashCode(this.id);
        return hash;
    }

    public String toString() {
        return "Element{" + "id=" + id + ", code=" + code + ", domain=" + domain + ", descriptions=" + descriptions + '}';
    }
    
}
